<?php /* Smarty version Smarty-3.1.15, created on 2017-09-03 17:56:05
         compiled from "D:\www\osadmin\uploads\include\template\panel\machine.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1505558143a268ae9d4-90173909%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '362a32efb86d4ca3cb35d6c1ad9aefdf5baec807' => 
    array (
      0 => 'D:\\www\\osadmin\\uploads\\include\\template\\panel\\machine.tpl',
      1 => 1504432563,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1505558143a268ae9d4-90173909',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_58143a26926b92_30620973',
  'variables' => 
  array (
    'osadmin_action_alert' => 0,
    'osadmin_quick_note' => 0,
    '_GET' => 0,
    'machines' => 0,
    'machine' => 0,
    'page_html' => 0,
    'osadmin_action_confirm' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_58143a26926b92_30620973')) {function content_58143a26926b92_30620973($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!-- TPLSTART 以上内容不需更改，保证该TPL页内的标签匹配即可 -->

<?php echo $_smarty_tpl->tpl_vars['osadmin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['osadmin_quick_note']->value;?>

<div class="btn-toolbar">
	<a href="machine_add.php" class="btn btn-primary"><i class="icon-plus"></i> 添加主机</a>
</div>
<div style="border:0px;padding-bottom:5px;height:auto">
	<form action="" method="GET" style="margin-bottom:0px" id="machine-search-form">
	<div style="float:left;margin-right:5px">
		<label>选择装机起始时间 </label>
		<input type="text" id="start_date" name="start_date" value="<?php echo $_smarty_tpl->tpl_vars['_GET']->value['start_date'];?>
" placeholder="起始时间" class="beg_time">
	</div>
	<div style="float:left;margin-right:5px">
		<label>选择装机结束时间</label>	
		<input type="text" id="end_date" name="end_date" value="<?php echo $_smarty_tpl->tpl_vars['_GET']->value['end_date'];?>
" placeholder="结束时间" class="end_time"> 
	</div>
	<div style="float:left;margin-right:5px">
		<label>模糊搜索</label>
		<input type="text" name="search_val" value="<?php echo $_smarty_tpl->tpl_vars['_GET']->value['search_val'];?>
" placeholder="输入主机序列号 /联系人/单位/编号" style="width:250px;"> 
	</div>

	<div class="btn-toolbar" style="padding-top:25px;padding-bottom:0px;margin-bottom:0px">
		<button type="submit" class="btn btn-primary"><strong>检索</strong></button>
	</div>
	<div style="clear:both;"></div>
	<input type="hidden" name="orderByFiled" id="orderById" value="">
	<input type="hidden" name="descOrAsc" id="descOrAscId" value="">
	</form>
</div>
<div class="block">
	<a href="#page-stats" class="block-heading" data-toggle="collapse">主机列表</a>
	<div id="page-stats" class="block-body collapse in">
		<table class="table table-striped">
			<thead>
			<tr>
				<th>#</th>
				<th>客户编号</th>
				<th>序列号</th>
				<th>主机型号</th>
				<th>联系人</th>
				<th>单位</th>
				<th>工程师</th>
				<th><a href="javascript:;" rel-asc="<?php echo $_smarty_tpl->tpl_vars['_GET']->value['descOrAsc'];?>
" class="last-vistor-time" field="last_vistor_time" onclick="getDesc()" id="clickId">最后一次拜访日期</a></th>
				<th width="80px">操作</th>
			</tr>
			</thead>
			<tbody>							  
			<?php  $_smarty_tpl->tpl_vars['machine'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['machine']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['machines']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['machine']->key => $_smarty_tpl->tpl_vars['machine']->value) {
$_smarty_tpl->tpl_vars['machine']->_loop = true;
?>				 
				<tr>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['machine_id'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['custom_code'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['serial_number'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['host_number'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['contacts_user'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['terminal_client'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['engineer'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['machine']->value['last_vistor_time'];?>
</td>
					<td>
						<a href="machine_modify.php?method=modify&machine_id=<?php echo $_smarty_tpl->tpl_vars['machine']->value['machine_id'];?>
" title="修改"   ><i class="icon-pencil"></i></a>
						<a data-toggle="modal" href="#myModal"  title= "删除" ><i class="icon-remove" href="machine.php?method=del&machine_id=<?php echo $_smarty_tpl->tpl_vars['machine']->value['machine_id'];?>
#myModal" data-toggle="modal" ></i></a>
					</td>
				</tr>
			<?php } ?>
		  </tbody>
		</table>  
	</div>
	<!--- START 分页模板 --->
            <?php echo $_smarty_tpl->tpl_vars['page_html']->value;?>

    <!--- END --->
</div>
<script>
	function getDesc(){
		$this = $("#clickId");
		var descOrAsc = $this.attr("rel-asc") == "" ? "desc" : $this.attr("rel-asc");
		var fieldVal = $this.attr("field");
		if(descOrAsc == "desc"){
			$this.attr("rel-asc","asc");
			$("#descOrAscId").val("asc");
		}else{
			$this.attr("rel-asc","desc");
			$("#descOrAscId").val("desc");
		}
		$("#orderById").val(fieldVal);	
		$("#machine-search-form").submit();
	}
</script>
<script>
$(function() {
	var beg_time=$( ".beg_time" );
	beg_time.datepicker({ dateFormat: "yy-mm-dd" });
	beg_time.datepicker( "option", "firstDay", 1 );
	
	var end_time=$( ".end_time" );
	end_time.datepicker({ dateFormat: "yy-mm-dd" });
	end_time.datepicker( "option", "firstDay", 1 );
	
});
</script>
<!---操作的确认层，相当于javascript:confirm函数--->
<?php echo $_smarty_tpl->tpl_vars['osadmin_action_confirm']->value;?>

	
<!-- TPLEND 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
